package com.ygqh.baby.service.wechat.model.good;

import com.alibaba.fastjson.annotation.JSONField;

import java.io.Serializable;

/**
 * 好物圈——订单信息
 *
 * <a href="https://wsad.weixin.qq.com/wsad/zh_CN/htmledition/order/html/document/orderlist/import.part.html">
 *     好物圈——导入订单</a>
 *
 * @Author: sunshuo
 * @Date: 2019/5/21 10:48
 * @Version: 1.0
 */
public class GoodOrder implements Serializable {

	private static final long serialVersionUID = 3463354461846727432L;

	public static final int ORDER_PAY = 3; // 支付完成
	public static final int ORDER_SEND = 4; // 已发货
	public static final int ORDER_REFUND = 5; // 已退款
	public static final int ORDER_COMPLETE = 100; // 已完成

	/**
	 * 订单id，需要保证唯一性		必填
	 */
	private String orderId;

	/**
	 * 订单创建时间，unix时间戳		必填
	 */
	private long createTime;

	/**
	 * 支付完成时间，unix时间戳		必填
	 */
	private long payFinishTime;

	/**
	 * 订单备注		非必填
	 */
	private String desc;

	/**
	 * 订单金额，单位：分		必填
	 */
	private long fee;

	/**
	 * 微信支付订单id，对于使用微信支付的订单，该字段必填		非必填
	 */
	private String transId;

	/**
	 * 订单状态，3：支付完成 4：已发货 5：已退款 100: 已完成		必填
	 */
	private int status;

	/**
	 * 订单扩展信息		必填
	 */
	private GoodOrderExt extInfo;

	@JSONField(name = "order_id")
	public String getOrderId() {
		return orderId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}

	@JSONField(name = "create_time")
	public long getCreateTime() {
		return createTime;
	}

	public void setCreateTime(long createTime) {
		this.createTime = createTime;
	}

	@JSONField(name = "pay_finish_time")
	public long getPayFinishTime() {
		return payFinishTime;
	}

	public void setPayFinishTime(long payFinishTime) {
		this.payFinishTime = payFinishTime;
	}

	@JSONField(name = "desc")
	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	@JSONField(name = "fee")
	public long getFee() {
		return fee;
	}

	public void setFee(long fee) {
		this.fee = fee;
	}

	@JSONField(name = "trans_id")
	public String getTransId() {
		return transId;
	}

	public void setTransId(String transId) {
		this.transId = transId;
	}

	@JSONField(name = "status")
	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	@JSONField(name = "ext_info")
	public GoodOrderExt getExtInfo() {
		return extInfo;
	}

	public void setExtInfo(GoodOrderExt extInfo) {
		this.extInfo = extInfo;
	}

	@Override
	public String toString() {
		return "GoodOrder{" +
				"orderId='" + orderId + '\'' +
				", createTime=" + createTime +
				", payFinishTime=" + payFinishTime +
				", desc='" + desc + '\'' +
				", fee=" + fee +
				", transId='" + transId + '\'' +
				", status=" + status +
				", extInfo=" + extInfo +
				'}';
	}
}
